package org.budo.dubbo.protocol.async.repository.aliyun.mns;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.aliyun.mns.client.AsyncCallback;

/**
 * @author lmw
 */
public class AbstractAsyncCallback<T> implements AsyncCallback<T> {
    private static final Logger log = LoggerFactory.getLogger(AbstractAsyncCallback.class);

    public void onSuccess(T result) {
        if (log.isDebugEnabled()) {
            log.debug("#15 onSuccess, result=" + result + ", this=" + this);
        }
    }

    public void onFail(Exception ex) {
        log.error("#20 onFail, ex=" + ex + ", this=" + this, ex);
    }
}